package org.example.springioc.Controller;


import org.example.springioc.model.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StudentController {
    @Autowired //可以注入配置文件中创建的对象
    private Student student;

    @RequestMapping("getStudent")
    public String getStudent() {
        return student.toString();
    }

}
